CC=gcc
TARGET=tree

C=$(wildcard *.c)
O=$(C:.c=.o)

WALL=-Wall

$(TARGET):$(O)
	$(CC) $^ -o $@ 

%.o:%.c
	$(CC) -c $< -o $@ $(WALL)

.PHONY:clean
clean:
	rm -rf *.o $(TARGET)